Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@tomaka
Copy link
Contributor

@tomaka tomaka commented May 19, 2019

Denying warnings is a bad good-idea. New versions of Rust almost always introduce new warnings, be it deprecated functions or new lints. For example a new version of Rust may decide that it's no longer necessary to explicitly put lifetimes at certain locations, and emit a warning if you do.

It has personally happened to me often enough in the past that I now religiously remove all the forbid(warnings) that I stumble upon.

Forbidding warnings also paradoxically leads to silencing warnings, such as with the allow(deprecated) that I removed in this PR as well.

@tomaka tomaka added the A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). label May 19, 2019
@tomaka tomaka requested a review from Demi-Marie May 19, 2019 12:09
Copy link
Contributor

@stanislav-tkach stanislav-tkach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mixed feelings about that, but it is really inconvenient without a fixed rust version.

Copy link
Contributor

@Demi-Marie Demi-Marie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

I often turn on #![forbid(warnings)] during development, but you are correct that it should be omitted from production code.

@Demi-Marie Demi-Marie merged commit c52d164 into paritytech:master May 20, 2019
@tomaka tomaka deleted the rm-forbid-warnings branch May 21, 2019 04:27
gavofyork added a commit that referenced this pull request May 22, 2019
gavofyork added a commit that referenced this pull request May 22, 2019
MTDK1 pushed a commit to bdevux/substrate that referenced this pull request Jul 10, 2019
MTDK1 pushed a commit to bdevux/substrate that referenced this pull request Jul 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants